package com.xscj.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * 留言实体类
 */
public class Message implements Serializable {

    /**
     *  留言ID
     */
    private Long id;

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 用户名称
     */
    private String userName;

    /**
     *
     * 用户类型
     * 1:学生，2：教师
     */
    private Integer userType;

    /**
     * 用户类型翻译
     */
    private String userTypeTranslate;


    /**
     * 留言标题
     */
    private String messageTitle;

    /**
     * 留言内容
     */
    private String messageContent;

    /**
     * 留言时间
     */
    private Date messageTime;

    /**
     * 状态
     * 状态：0：未解决，1：已解决，2：已关闭
     */
    private Integer status;

    /**
     * 状态翻译
     */
    private String statusTranslate;

    /**
     * 系统回复内容
     */
    private String replyContent;

    /**
     * 系统回复时间
     */
    private Date replyTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;

        if (userType == 1) {
            this.setUserTypeTranslate("学生");
        } else if (userType == 2) {
            this.setUserTypeTranslate("教师");
        }

    }

    public String getMessageTitle() {
        return messageTitle;
    }

    public void setMessageTitle(String messageTitle) {
        this.messageTitle = messageTitle;
    }

    public String getMessageContent() {
        return messageContent;
    }

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public Date getMessageTime() {
        return messageTime;
    }

    public void setMessageTime(Date messageTime) {
        this.messageTime = messageTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;

        if (status == 0) {
            this.setStatusTranslate("未解决");
        } else if (status == 1) {
            this.setStatusTranslate("已解决");
        } else if (status == 2) {
            this.setStatusTranslate("已关闭");
        }

    }

    public String getReplyContent() {
        return replyContent;
    }

    public void setReplyContent(String replyContent) {
        this.replyContent = replyContent;
    }

    public Date getReplyTime() {
        return replyTime;
    }

    public void setReplyTime(Date replyTime) {
        this.replyTime = replyTime;
    }

    public String getUserTypeTranslate() {
        return userTypeTranslate;
    }

    public void setUserTypeTranslate(String userTypeTranslate) {
        this.userTypeTranslate = userTypeTranslate;
    }

    public String getStatusTranslate() {
        return statusTranslate;
    }

    public void setStatusTranslate(String statusTranslate) {
        this.statusTranslate = statusTranslate;
    }
}
